const http = uni.$u.http

// 获取收货地址列表
export const getAddressList = (params, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/adminQueryAddressPerson', params, config)
// 获取收货地址详情
export const getAddressDetail = (params, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/adminViewMemberShipPerson', params, config)
// 新增地址
export const saveAddress = (params, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/adminAddMemberShoppingAddress', params, config)
// 编辑地址
export const editAddress = (params, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/adminUpdateMemberShoppingAddress', params, config)
// 删除地址
export const deleteAddress = (params, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/deleteMemberShoppingAddress', params, config)

// 根据经纬度请求地址详情
export const getBaseGeocodingCommunalBase = (params, config = { custom: { type: 'ycMainUrl' }}) => http.post('/api/mobile/membership/address/getBaseGeocodingCommunalBase', params, config)

// 查询微信导入地址信息的详情（根据名称查询省市区code）
export const queryAddressLibraryInfo = (params, config = { custom: { type: 'ycMainUrl' }}) => http.post('/api/mobile/baseservice/addressLibrary/queryAddressLibraryInfo', params, config)
